import {emit} from 'network/request.js'
export function addOrder(goods){
    let json=JSON.stringify(goods)
    console.log('post',json);
  return emit({
    method:"post",
    url:'/addOrder',
    headers:{
      'content-type':'application/json'  //如果写成contentType会报错
    },
    data:json
  })
}

export function handleOrder(id){
  return emit({
    method:"get",
    url:"/handleOrder",
    params:{
      id
    }
  })
}

export function getAllOrder(id){
  return emit({
    method:"get",
    url:"/getAllOrder",
    params:{
      id
    }
  })
}